package edu.rmit.service;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * This interface defines the chat callback operation. Which can implement send
 * chat message, send forum message, and remove forum message.
 * 
 * @author Joey George
 * @version 1.0
 */
public interface IChatCallBackService extends Remote {
	/**
	 * This method defines the operation to send an remove forum message to all
	 * users.
	 * 
	 * @param messageId
	 *            The message id which you have removed.
	 * @throws RemoteException
	 */
	public void removeForumMessage(int messageId) throws RemoteException;

	/**
	 * This method defines the operation to send an add forum message to all
	 * users.
	 * 
	 * @param from
	 *            The sender name of the forum message.
	 * @param message
	 *            The message body which the sender send.
	 * @throws RemoteException
	 */
	public void addForumMessage(String from, String message)
			throws RemoteException;

	/**
	 * This method defines the operation to send an add chat message to all
	 * users.
	 * 
	 * @param from
	 *            The sender name of the chat message.
	 * @param message
	 *            The message body which the sender send.
	 * @throws RemoteException
	 */
	public void addChatMessage(String from, String message)
			throws RemoteException;

	/**
	 * This method defines the operation to send an quit message to all users.
	 * 
	 * @param from
	 *            The sender name of the chat message.
	 * @throws RemoteException
	 */
	public void quitChatMessage(String from) throws RemoteException;

	/**
	 * This method defines the operation to send an joined message to all users.
	 * 
	 * @param from
	 *            The sender name of the chat message.
	 * @throws RemoteException
	 */
	public void joinedChatMessage(String from) throws RemoteException;

	/**
	 * This method defines the operation to send an system message to all users.
	 * 
	 * @param message
	 *            The message body which the system want to send.
	 * @throws RemoteException
	 */
	public void systemInfoMessage(String message) throws RemoteException;
}
